namespace Terra.Core.Common.Models.Shared;

/// <summary>
/// 下拉选项DTO
/// </summary>
public class SelectOption
{
    /// <summary>
    /// 选项值
    /// </summary>
    public string Value { get; set; }

    /// <summary>
    /// 选项标签
    /// </summary>
    public string Label { get; set; }

    /// <summary>
    /// 是否禁用
    /// </summary>
    public bool Disabled { get; set; }

    /// <summary>
    /// 分组
    /// </summary>
    public string Group { get; set; }

    /// <summary>
    /// 附加数据
    /// </summary>
    public object Extra { get; set; }

    /// <summary>
    /// 创建下拉选项实例
    /// </summary>
    /// <param name="value">选项值</param>
    /// <param name="label">选项标签</param>
    public SelectOption(string value, string label)
    {
        Value = value;
        Label = label;
    }

    /// <summary>
    /// 创建下拉选项实例
    /// </summary>
    public SelectOption()
    {
    }
}